package com.sphd.restaurantsystem.adapters;

import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;
import com.sphd.restaurantsystem.R;
import com.sphd.restaurantsystem.info.DuihuanInfo;

import java.util.List;

/**
 * Created by Hu on 2016/11/14.
 */

public class DhAdapter extends BaseQuickAdapter<DuihuanInfo> {
    public DhAdapter(int layoutResId, List<DuihuanInfo> data) {
        super(layoutResId, data);
    }

    @Override
    protected void convert(BaseViewHolder baseViewHolder, DuihuanInfo duihuanInfo) {
            baseViewHolder.setText(R.id.jifen_item_textview,duihuanInfo.getDishes())
                    .setVisible(R.id.jifen_time_textview,true)
                    .setText(R.id.jifen_time_textview,duihuanInfo.getRegtime())
                    .setText(R.id.jifen_num_textview,String.valueOf(duihuanInfo.getIntegral()));
    }
}
